package structural.decorator;

public class DecoratorPattern {
    public static void main(String[] args) {
        // Create a basic cloud stream
        IStream cloudStream = new CloudStream();
        cloudStream.write("Hello, World!");

        // Decorate the cloud stream with encryption
        IStream encryptedStream = new EncryptedCloudStream(cloudStream);
        encryptedStream.write("Hello, World!");

        // Decorate the cloud stream with compression
        IStream compressedStream = new CompressedCloudStream(encryptedStream);
        compressedStream.write("Hello, W  orl d !");
    }
}
